<?php

/**
 * @BelongProject: flami_mangers
 * @Author: Zwc
 * @CreateTime: 2025-11-12 19:32:41
 * @Description: TODO
 */

namespace App\Api;

use App\Domain\LangDataDomain;
use PhalApi\Api;

class LangData extends Api
{
    public function getRules()
    {
        return [
            'getLangData' => [
                'langId' => ['name' => 'langId', 'type' => 'int', 'desc' => '语言ID']
            ],
            'getLangDataIos' => [
                'langId' => ['name' => 'langId', 'type' => 'int', 'desc' => '语言ID']
            ]
        ];
    }

    /**
     * 获取APP多语言
     * @return array
     */
    public function getLangData(): array
    {
        return [
            'code' => 0,
            'msg' => \PhalApi\T('评价成功'),
            'info' => LangDataDomain::getLangData($this->langId)
        ];
    }

    /**
     * 获取APP多语言
     * @return array
     */
    public function getLangDataIos(): array
    {
        return [
            'code' => 0,
            'msg' => \PhalApi\T('评价成功'),
            'info' => LangDataDomain::getLangDataIos($this->langId)
        ];
    }


}